home *** CD-ROM | disk | FTP | other *** search
- #include <SpeechRecognition.h>
-
- pascal void MyRemoveNotificationCallBack (SRRecognizer recognizer);
-
- pascal void MyRemoveNotificationCallBack (SRRecognizer recognizer)
- {
- SRCallBackParam myCallBackPB;
- SRCallBackUPP mySavedCallBack;
- Size myLen;
- OSErr myErr = noErr;
-
- myLen = sizeof (myCallBackPB);
- myErr = SRGetProperty (recognizer, kSRCallBackParam, &myCallBackPB, &myLen);
- if (myErr == noErr) {
- if (myCallBackPB.callBack != nil) {
- mySavedCallBack = myCallBackPB.callBack;
-
- myCallBackPB.callBack = nil;
- myErr = SRSetProperty (recognizer, kSRCallBackParam, &myCallBackPB,
- sizeof (myCallBackPB));
-
- DisposeRoutineDescriptor (mySavedCallBack);
- }
- }
- }
-
-